package com.zelix;

import java.util.StringTokenizer;

class tq
        implements qq {

    private String a;
    private String b;
    private boolean c;
    private String d;
    private String e;
    private String f;
    private String g;
    private sx h;
    private String i;
    private String j;
    private static String z;

    tq(String s) {
        super();
        b = "";
        c = true;
        g = "";
        i = "";
        a = s.trim();
        int l = i();
        if (l > -1) {
            b = a.substring(0, l);
            String s1 = a.substring(l + z.length()).trim();
            int i1 = s1.indexOf("(");
            if (i1 > -1) {
                boolean flag = a(s1.substring(0, i1).trim());
                if (flag) {
                    b(s1.substring(i1));
                } else {
                    c = false;
                }
            } else {
                c = a(s1.trim());
            }
        } else {
            c = false;
        }
    }

    private boolean a(String s) {
        StringTokenizer stringtokenizer;
        int l;
        int i1;
        StringBuffer stringbuffer;
        stringtokenizer = new StringTokenizer(s, ".");
        l = stringtokenizer.countTokens();
        if (l > 1) {
            i1 = 0;
            stringbuffer = new StringBuffer();
            while (stringtokenizer.hasMoreTokens()) {
                String s1 = stringtokenizer.nextToken();
                if (i1 == 0) {
                    stringbuffer.append(s1);
                } else if (i1 == l - 1) {
                    e = s1.trim();
                    int j1 = e.indexOf(" ");
                    if (j1 <= -1)
                        continue; /* Loop/switch isn't completed */
                    e = e.substring(0, j1);
                } else {
                    stringbuffer.append("." + s1);
                }
                i1++;
            }
            d = stringbuffer.toString();
            d = d.replace('/', '.');
            return true;
        }
        return false;
    }

    public String a() {
        if (d != null)
            return d.replace('/', '.');
        else
            return null;
    }

    String e() {
        return j;
    }

    public int b() {
        if (h != null)
            return h.b();
        else
            return -1;
    }

    String g() {
        return f;
    }

    String h() {
        return e;
    }

    public String c() {
        return a;
    }

    private void b(String s) {
        if (s.length() < 2)
            return;
        String s1 = s;
        int l = s1.indexOf("(", 1);
        int i1 = s1.indexOf(")");
        if (l > i1) {
            String s2 = s1.substring(0, l).trim();
            if (is.f(s2)) {
                f = s2;
                s1 = s1.substring(l);
            }
        }
        int j1 = s1.lastIndexOf(":");
        int k1 = s1.lastIndexOf(")");
        if (j1 > -1 && k1 > -1 && k1 > j1) {
            String s3 = s1.substring(j1 + 1, k1).trim();
            try {
                int l1 = Integer.parseInt(s3);
                h = new sx(l1);
                g = s1.substring(0, j1 + 1);
                i = s1.substring(k1);
            }
            catch (NumberFormatException _ex) {
                g = s1;
            }
        } else {
            g = s1;
        }
    }

    private int i() {
        boolean flag;
        byte byte0;
        int l;
        flag = false;
        byte0 = -1;
        l = -1;
//        if(!flag1) goto _L2; else goto _L1
//_L1:
        do {
            if (l > 0) {
                char c1 = a.charAt(l - 1);
                switch (c1) {
                    case 9: // '\t'
                    case 32: // ' '
                        flag = true;
                        byte0 = (byte) l;
                        break;
                }
            }
            byte0 = 0;
        } while (!flag && (l = a.indexOf(z, l + 1)) > -1);
//_L3:
        return byte0;
    }

    boolean j() {
        return j != null;
    }

    public boolean d() {
        return h != null;
    }

    public boolean k() {
        return c && j == null;
    }

    void c(String s) {
        j = s;
    }

    private static String z(char[] chs) {
        for (int i = 0; i < chs.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 0x5c;
                    break;
                case 1:
                    key = 88;
                    break;
                case 2:
                    key = 84;
                    break;
                case 3:
                    key = 8;
                    break;
                default:
                    key = 48;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static {
        z = z("=,t".toCharArray());
    }
}